﻿using System.Text.Json.Serialization;

namespace Sample.JwtBearer.Api.Responses;

public class TokenResponse
{
    [JsonPropertyName("access_token")]
    public string AccessToken { get; set; } = string.Empty;

    [JsonPropertyName("token_type")]
    public string TokenType { get; set; } = string.Empty;

    /// <summary>
    /// 访问 Token 效期
    /// 单位：s/秒
    /// </summary>
    [JsonPropertyName("expires_in")]
    public int ExpiresIn { get; set; }

    [JsonPropertyName("refresh_token")]
    public string RefreshToken { get; set; } = string.Empty;

    /// <summary>
    /// 刷新 Token 效期
    /// 单位：day/天
    /// </summary>
    [JsonPropertyName("expiry_time_of_day")]
    public int ExpiryTimeOfDay { get; set; }
}